import React from "react";
import { RouterType } from "../types";
import { HomeO,FlagO,FireO,Contact } from '@react-vant/icons';
import {Navigate} from 'react-router-dom'
import Login from '../page/Login'
import Sigin from '../page/Sigin'
import Home from '../page/Home'

import HomeC from '../page/Home/Home'
import Stroke from '../page/Home/Stroke'
import ExplosiveZone from '../page/Home/ExplosiveZone'
import My from '../page/Home/My'

import SearchC from '../page/Search'
import Detail from '../page/Detail'

const RouterList:RouterType[]=[{
    path:'/',
    element:<Navigate to="/login"/>,
},{
    path:'/login',
    element:<Login/>,
    meate:"登录",
},{
    path:"/sigin",
    element:<Sigin/>,
    meate:"注册",
},{
    path:"/home",
    element:<Home/>,
    meate:"主页",
    children:[{
        path:"/home/home",
        element:<HomeC/>,
        icon:<HomeO  />,
        meate:"首页"
    },{
        path:"/home/stroke",
        element:<Stroke/>,
        icon:<FlagO  />,
        meate:"行程"
    },{
        path:'/home/explosivezone',
        element:<ExplosiveZone/>,
        icon:<FireO  />,
        meate:'火爆区'
    },{
        path:'/home/my',
        element:<My/>,
        icon:<Contact  />,
        meate:'我的'
    }]
},{
    path:"/detail/:id",
    element:<Detail/>
},{
    path:"/search",
    element:<SearchC/>
}]
export default RouterList